<template>
  <div class="app-container calendar-list-container">
    <div class="filter-container">
      <el-input @keyup.enter.native="handleFilter" style="width: 200px;" class="filter-item" placeholder="姓名或账户" v-model="listQuery.name"> </el-input>
      <el-button class="filter-item" type="primary" v-waves icon="search" @click="getList">搜索</el-button>
    </div>

  </div>
</template>

<script>
  import {
    page
  } from 'api/admin/demo/demo';
  import { mapGetters } from 'vuex';
  export default {
    name: 'demo',
    listQuery: {
      page: 1,
      limit: 20,
      name: undefined
    },
    data() {
      return {
        tableKey: 0,
      }
    },
    computed: {
      ...mapGetters([
        'elements'
      ])
    },
    methods: {
      getList() {
        this.listLoading = true;
        page(this.listQuery)
          .then(response => {
            this.list = response.data.rows;
            this.total = response.data.total;
            this.listLoading = false;
          })
      }
    }
}

</script>
